#pragma once

#include <wx/app.h>
#include <windows.h>
#include <process.h>

class wxDLLApp : public wxApp {};

IMPLEMENT_APP_NO_MAIN(wxDLLApp) 
DECLARE_APP(wxDLLApp) 


BOOL APIENTRY DllMain( HANDLE hModule, DWORD fdwReason, LPVOID lpReserved) 
{ 
	wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD();
	wxDISABLE_DEBUG_SUPPORT();
	switch (fdwReason)
	{
	case DLL_PROCESS_ATTACH:
		{                     
			int argc = 0; 
			char **argv = NULL; 
			wxEntryStart(argc, argv);               
			if ( !wxTheApp || !wxTheApp->CallOnInit() ) 
				return FALSE; 
		}   
		break;
	case DLL_THREAD_ATTACH:
		break;
	case DLL_THREAD_DETACH:
		break;
	case DLL_PROCESS_DETACH:
		wxEntryCleanup(); 
		break;
	}
	
    return TRUE; 
}